<template>
    <h1>子组件</h1>
     <h1>{{ num }}</h1>
     <h1>{{ msg }}</h1>
     <button @click="num+=2">子组件</button>
</template> 
<script setup>
import {ref , reactive} from 'vue'
let num = ref(0)
let msg = reactive('abc')
const getNum = (arg)=>{
    num.value+=arg
    console.log(num.value);
}
// 抛出 可见内容
defineExpose({
    num,getNum
})
</script>